home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / Amiga_Mail_Vol2 / Archives / Plain / jf90 / GenlokXII-26.ascii next >
Encoding:
Text File  |  1990-03-26  |  5.9 KB  |  150 lines

  1. (c)  Copyright 1989 Commodore-Amiga, Inc.   All rights reserved.
  2. The information contained herein is subject to change without notice, and 
  3. is provided "as is" without warranty of any kind, either express or implied.  
  4. The entire risk as to the use of this information is assumed by the user.
  5.  
  6.  
  7.  
  8.         PAL and NTSC Genlock Interface Guidelines
  9.  
  10.             by Scott Hood - CBM Engineering
  11.  
  12. This article describes the reset mechanism of the Video Beam Counters on the 
  13. current version of the Agnus chip when an external device (i.e. genlock) 
  14. applies sync pulses on the HSY* and VSY* pins . The Commodore-recommended 
  15. method of interfacing genlock devices to the Amiga for current and future 
  16. compatiblity is described here.
  17.  
  18.  
  19. Hardware Interpretation of  HSY* and VSY* Reset Pulses
  20. ------------------------------------------------------
  21.  
  22. Horizontal Counter
  23.  
  24. After Agnus is configured to accept external syncs, by setting the ERSY bit 
  25. in the BPLCON0 register, the horizontal counter will respond as follows:
  26.  
  27. In NTSC Mode
  28.  
  29.     If the external HSY* reset is not applied at the end of a 
  30.     "short line", the next line will be a "long line", as normal.  
  31.     If no HSY* is applied at the end of a "long line", the horizontal 
  32.     counter will roll-over and is held reset at count 00.  The counter 
  33.     will resume counting once the external HSY* pulse is applied.
  34.  
  35.     If the external HSY* reset is applied at the end of a "short line", 
  36.     the following line is forced to be another "short line".
  37.  
  38.     If the counter reaches the end of a "long line" when the external 
  39.     HSY* is asserted, the next line is a "short line" and will start at 
  40.     count 01 (as opposed to count 00).  Otherwise, if no reset occurs 
  41.     the counter will roll-over to count 00 and stop.
  42.  
  43.  
  44. In PAL Mode
  45.  
  46.     In PAL mode the counter will operate with "short lines" at all times 
  47.     ("longlines" are disabled) and will respond as follows:
  48.  
  49.     If the external HSY* is not applied at the end of a line, the 
  50.     horizontal counter will roll-over to the beginning of the next line 
  51.     and is held at count 00, until the next HSY* pulse occurs.
  52.  
  53.     If the external HSY* is applied when the counter reaches the end of 
  54.     a line, the next line will start at count 01, skipping count 00.
  55.  
  56.  
  57.  
  58. Vertical Counter
  59.  
  60. The vertical counter operates in the same manner for both NTSC and PAL modes. 
  61. After Agnus is configured to accept external syncs (ERSY bit in BPLCON0), the 
  62. vertical counter will respond as described below.
  63.  
  64. In Interlace Mode
  65.  
  66.     In interlaced NTSC mode, if an external VSY* pulse is applied, the 
  67.     vertical counter will be reset to count 000 (first line) and the 
  68.     long-field condition is set at the beginning of the next horizontal 
  69.     line (at horizontal count 02) .  In interlaced PAL mode, if an 
  70.     external VSY* pulse is applied the long-field condition is also set.  
  71.     Note that for both NTSC and PAL systems, if the external VSY* pulse 
  72.     is not asserted during the end of a short (or long) field, the 
  73.     vertical counter will roll-over and start a long (or short) field 
  74.     sequence.
  75.  
  76. In Non-Interlace Mode
  77.  
  78.     In non-interlace mode the vertical counter is set to operate with 
  79.     either long or short fields, depending on the last value that the 
  80.     software wrote to the FRAME bit. In this mode, whenever an external 
  81.     VSY* pulse is applied, the counter is reset to line count 000 (first 
  82.     line) at the beginning of the next horizontal line.
  83.  
  84.  
  85. Pulse Duration
  86.  
  87. The width of the active-low vertical (VSY*) pulse should be less than or 
  88. equal to one line duration (63.556 uS NTSC, 63.999 uS PAL) but greater than 
  89. one-half line duration (31.77 uS NTSC, 31.999 uS PAL) and should be asserted 
  90. during the beginning of a horizontal line, at which time the vertical logic 
  91. is triggered and the first line is started.  The width of the active-low 
  92. horizontal (HSY*) pulse should be greater than or equal to eight hi-res 
  93. pixels (0.558 uS for NTSC or 0.563 uS for PAL) for proper operation.
  94.  
  95.  
  96.  
  97.  
  98. NTSC and PAL Genlock Interface Guidelines
  99. -----------------------------------------
  100.  
  101. In order to synchronize the Amiga to an external source, the genlock device 
  102. must provide reset pulses to the Amiga's sync lines which have the effects 
  103. described in the section above.    This section describes the proper method 
  104. of applying these reset pulses .  
  105.  
  106. For NTSC Amiga models, the genlock device must provide the Amiga with 
  107. horizontal and vertical reset pulses with the following rates:
  108.  
  109.     HSY* line: Active-low pulse of proper duration every
  110.            two lines  (i.e. 127.11 uS or 7.8671 KHz).
  111.  
  112.     VSY* line: Active-low pulse of proper duration every
  113.            two fields (i.e. 33.36 mS or 29.97 Hz).
  114.  
  115. Note after the VSY* reset pulse the next field will be an even field (long 
  116. field).
  117.  
  118. For PAL Amiga models, the genlock device must provide the Amiga with 
  119. horizontal and vertical reset pulses with the following rates:
  120.  
  121.     HSY* line: Active-low pulse of proper duration every
  122.            line (i.e. 63.99 uS or 15.625 KHz).
  123.  
  124.     VSY* line: Active-low pulse of proper duration every
  125.            two fields (i.e. 39.99 mS or 25.0 Hz).
  126.  
  127. Note that after the VSY* reset pulse the next field will be an even field 
  128. (long field).
  129.  
  130. Both reset pulses must be generated regardless of whether or not source video 
  131. is being input to the genlock device!
  132.  
  133. In addition to providing the Amiga with the proper horizontal and vertical 
  134. reset pulses, the genlock device must also provide the Amiga with a system 
  135. clock that is synchronized with the external video.  One method of doing this 
  136. would be to multiply the video source line duration up to the Amiga's system 
  137. clock frequency, thus making a line-locked clock that will also be 
  138. free-running at the correct frequency when no video is present.  For correct 
  139. operation of the Amiga as a multitasking system, the proper system clock 
  140. frequency appearing on the XCLK pin must be the following for NTSC and PAL 
  141. Amiga systems:
  142.  
  143.     NTSC XCLK:28.63636 Mhz
  144.     PAL XCLK: 28.375156 Mhz
  145.  
  146. Note that some PAL genlock designers provide the Amiga's XCLK input with a 
  147. 28.250Mhz clock frequency.  This is not recommended for proper Amiga 
  148. operation!
  149.  
  150.